package org.mcb.zebra.portal.services;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.apache.pluto.PortletWindow;
import org.apache.pluto.spi.PortalCallbackService;
import org.apache.pluto.spi.PortletURLProvider;
import org.apache.pluto.spi.ResourceURLProvider;
import org.mcb.zebra.portal.manager.PortalManager;
import org.mcb.zebra.portal.manager.ZebPortalManager;

@SuppressWarnings("unchecked")
public class ZebPortalCallbackService implements PortalCallbackService {
	/*
	 * (non-Javadoc)
	 * 
	 * @see org.apache.pluto.spi.PortalCallbackService#addResponseProperty(javax.servlet.http.HttpServletRequest,
	 *      org.apache.pluto.PortletWindow, java.lang.String, java.lang.String)
	 */
	@Override
	public void addResponseProperty(HttpServletRequest request,
			PortletWindow portletWindow, String property, String value) {
		// TODO Auto-generated method stub

	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.apache.pluto.spi.PortalCallbackService#getPortletURLProvider(javax.servlet.http.HttpServletRequest,
	 *      org.apache.pluto.PortletWindow)
	 */
	@Override
	public PortletURLProvider getPortletURLProvider(HttpServletRequest request,
			PortletWindow portletWindow) {
		PortalManager manager = ZebPortalManager.getInstance();
		return manager.getPortletURLProvider(request, portletWindow);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.apache.pluto.spi.PortalCallbackService#getRequestProperties(javax.servlet.http.HttpServletRequest,
	 *      org.apache.pluto.PortletWindow)
	 */
	@Override
	public Map getRequestProperties(HttpServletRequest request,
			PortletWindow portletWindow) {

		return null;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.apache.pluto.spi.PortalCallbackService#getResourceURLProvider(javax.servlet.http.HttpServletRequest,
	 *      org.apache.pluto.PortletWindow)
	 */
	@Override
	public ResourceURLProvider getResourceURLProvider(
			HttpServletRequest request, PortletWindow portletWindow) {
		PortalManager manager = ZebPortalManager.getInstance();
		return manager.getResourceURLProvider(request, portletWindow);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.apache.pluto.spi.PortalCallbackService#setResponseProperty(javax.servlet.http.HttpServletRequest,
	 *      org.apache.pluto.PortletWindow, java.lang.String, java.lang.String)
	 */
	@Override
	public void setResponseProperty(HttpServletRequest request,
			PortletWindow portletWindow, String property, String value) {
		// TODO Auto-generated method stub

	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.apache.pluto.spi.PortalCallbackService#setTitle(javax.servlet.http.HttpServletRequest,
	 *      org.apache.pluto.PortletWindow, java.lang.String)
	 */
	@Override
	public void setTitle(HttpServletRequest request,
			PortletWindow portletWindow, String title) {
		// TODO Auto-generated method stub

	}

}
